package controller;

import com.alibaba.dubbo.config.annotation.Reference;
import service.HelloService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloAction {

    @Reference   // 远程去调用服务方的service
    private HelloService helloService;



    @GetMapping("hello")
    @ResponseBody
    public String sayHi(String name ){
        return helloService.sayHello(name);
    }
}
